package GUI;

import Market.GenCo;
import Market.Market;
import sim.display.Console;
import sim.display.GUIState;
import sim.engine.SimState;
import sim.engine.Steppable;


/**
 * 
 * @author 
 *
 */
public class AWEMGUI extends GUIState 
{
	
	private Market market;

	/**
	 * 
	 * @param state
	 */
	public AWEMGUI(SimState state) 
	{
		super(state);
		market=(Market)state;		
	}

	
  /**
  * 	
  */
  public void makeGenCoLearn()
  {
	final Steppable updater = new Steppable()
	{	
		public void step(SimState simState) 
		{
			market.makeGenCoLearn();			
		}
		
	};
	this.scheduleImmediatelyAfter(updater);
   }


	/**
	 * 
	 * @param args
	*/
	public static void main(String[] args)
	{	 
	 Market market = new Market(System.currentTimeMillis());       
     market.start();
	 AWEMGUI gui =new AWEMGUI(market);
	 Console c = new Console(gui);
	 c.setVisible(true);
     market.finish();
	}

}
